﻿/*
 
 * Author:	Bob Limnor (info@limnor.com)
 * Project: Limnor Studio
 * Item:	Database support
 * License: GNU General Public License v3.0
 
 */
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.ComponentModel;

namespace LimnorDatabase
{
	[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")]
	class EasyDataSetDesigner : IDesigner
	{
		// Local reference to the designer's component. 
		private IComponent component;
		// Public accessor to the designer's component. 
		public System.ComponentModel.IComponent Component
		{
			get
			{
				return component;
			}
		}

		public EasyDataSetDesigner()
		{
		}

		public void Initialize(System.ComponentModel.IComponent component)
		{
			// This method is called after a designer for a component is created, 
			// and stores a reference to the designer's component. 
			this.component = component;
		}

		// This method peforms the 'default' action for the designer. The default action  
		// for a basic IDesigner implementation is invoked when the designer's component  
		// is double-clicked. By default, a component associated with a basic IDesigner  
		// implementation is displayed in the design-mode component tray. 
		public void DoDefaultAction()
		{
		}

		// Returns a collection of designer verb menu items to show in the  
		// shortcut menu for the designer's component. 
		public System.ComponentModel.Design.DesignerVerbCollection Verbs
		{
			get
			{
				DesignerVerbCollection verbs = new DesignerVerbCollection();
				DesignerVerb dv1 = new DesignerVerb("Display Component Name", new EventHandler(this.ShowComponentName));
				verbs.Add(dv1);
				return verbs;
			}
		}

		// Event handler for displaying a message box showing the designer's component's name. 
		private void ShowComponentName(object sender, EventArgs e)
		{
		}

		// Provides an opportunity to release resources before object destruction. 
		public void Dispose()
		{
		}

	}
}
